#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main() {
	int t;
	cin >> t;
	while (t--) {
		int n;
		cin >> n;
		if (n - 3 < 0)
			cout << 0 << endl;
		else if (n - 3 == 0)
			cout << 1 << endl;
		else
			cout << (n - 3) * 26 % 998244353;
	}
	return 0;
}
